$OpenBSD: patch-configure_ac,v 1.2 2016/11/29 22:26:57 tb Exp $
--- configure.ac.orig	Wed Sep 14 22:52:04 2016
+++ configure.ac	Sun Sep 25 21:17:03 2016
@@ -22,6 +22,7 @@ AC_CANONICAL_HOST
 PLATFORM="unknown"
 AS_CASE([$host_os],
     [freebsd*], [PLATFORM="freebsd"],
+    [openbsd*], [PLATFORM="openbsd"],
     [darwin*], [PLATFORM="osx"],
     [cygwin], [PLATFORM="cygwin"],
     [PLATFORM="nix"])
@@ -172,15 +173,22 @@ AS_IF([test "x$enable_icons" != xno],
             [AC_MSG_ERROR([gtk+-2.0 or higher is required for icons])],
             [AC_MSG_NOTICE([gtk+-2.0 not found, icons not enabled])])])])
 
-AS_IF([test "x$PLATFORM" != xosx],
-    [AC_CHECK_LIB([readline], [main], [],
-        [AC_MSG_ERROR([libreadline is required for profanity])])],
-    [AC_CHECK_FILE([/usr/local/opt/readline/lib],
-        [LIBS="-lreadline $LIBS"
-            AM_CPPFLAGS="-I/usr/local/opt/readline/include $AM_CPPFLAGS"
-            AM_LDFLAGS="-L/usr/local/opt/readline/lib $AM_LDFLAGS"
-            AC_SUBST(AM_LDFLAGS)],
-        [AC_MSG_ERROR([libreadline is required for profanity])])])
+AS_IF([test "x$PLATFORM" = xosx],
+      [AC_CHECK_FILE([/usr/local/opt/readline/lib],
+          [LIBS="-lreadline $LIBS"
+              AM_CPPFLAGS="-I/usr/local/opt/readline/include $AM_CPPFLAGS"
+              AM_LDFLAGS="-L/usr/local/opt/readline/lib $AM_LDFLAGS"
+              AC_SUBST(AM_LDFLAGS)])],
+      [test "x$PLATFORM" = xopenbsd],
+      [AC_CHECK_FILE([/usr/local/include/ereadline],
+          [LIBS="-lereadline $LIBS"
+              AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
+              AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
+              AC_SUBST(AM_LDFLAGS)])],
+      [test "x$PLATFORM" = xnix],
+      [AC_CHECK_LIB([readline],[main],[],
+              [AC_MSG_ERROR([libreadline is required for profanity])])],
+      [AC_MSG_ERROR([libreadline is required for profanity])])
 
 ### Check for desktop notification support
 ### Linux/FreeBSD require libnotify
@@ -196,7 +204,7 @@ AS_IF([test "x$PLATFORM" = xosx],
                     [AC_MSG_ERROR([terminal-notifier not found, required for desktop notifications.])],
                     [AC_MSG_NOTICE([Desktop notifications not supported.])])],
                 [AC_DEFINE([HAVE_OSXNOTIFY], [1], [terminal notifier])])])],
-    [test "x$PLATFORM" = xnix -o "x$PLATFORM" = xfreebsd],
+    [test "x$PLATFORM" = xnix -o "x$PLATFORM" = xfreebsd -o "x$PLATFORM" = xopenbsd],
         [AS_IF([test "x$enable_notifications" != xno],
             [PKG_CHECK_MODULES([libnotify], [libnotify],
                 [AC_DEFINE([HAVE_LIBNOTIFY], [1], [libnotify module])],
